app.service('z-emailAddressSet-s', [
    '$rootScope',
    '$z-http',
    'ZModel',
    function ($rootScope, $http, ZModel) {
        var service = {
            getEmail: function (success, fault) {
                $http.post("systemConfigure/getEmail.do")
                .success(function (data) {
                    success(data.success);
                }).error(function (data) {
                    fault(data);
                });
            },
            updateEmail : function(data,success,fault) {
				$http.post("systemConfigure/updateEmail.do",
	                    $.param(data),
	                    {headers: {'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'}}
	                ).success(function(data) {
						success(data.success);
	  				}).error(function(data) {
	  					if(fault) {
	  						fault(data);
	  				}
  				});
			},
			saveAttendaceAuto : function(data,success,fault) {
				$http.post("access/saveAttendaceAuto.do",data)
					.success(function(data) {
						success(data.success);
	  				}).error(function(data) {
						fault(data);
  				});
			},
			saveSchedulDayKeyAuto : function(success,fault) {
				$http.post("access/saveSchedulDayKeyAuto.do")
					.success(function(data) {
						success(data.success);
	  				}).error(function(data) {
						fault(data);
  				});
			},
			
			
			/*requestMaindataVersion : function(data,success,fault) {
				$http.post("main/requestMaindataVersion.do",
						$.param(data),
	                    {headers: {'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'}}
					).success(function(data) {
						success(data.success);
	  				}).error(function(data) {
						fault(data);
  				});
			},*/
			requestMaindata : function(success,fault) {
				$http.post("main/requestMaindata.do"
					).success(function(data) {
						success(data.success);
	  				}).error(function(data) {
						fault(data);
  				});
			},
			requestMaindataNew : function(data,success,fault) {
				$http.post("main/requestMaindataNew.do",data).success(function(data) {
						success(data.success);
	  				}).error(function(data) {
						fault(data);
  				});
			},
        };
        return service;
    }]);